if(CONFDATA.FIRSTMSG < 1 | CONFDATA.LASTMSG < 1) then exit
address(thorport)
REQUESTINTEGER MIN '"'CONFDATA.FIRSTMSG'"' MAX '"'CONFDATA.LASTMSG'"' INIT '"'CONFDATA.FIRSTMSG'"' TITLE '"First message in range:"' BT '"_Ok|_Cancel"'
firstmsg = result
if(rc ~= 0 | firstmsg = "RESULT") then exit
REQUESTINTEGER MIN '"'firstmsg'"' MAX '"'CONFDATA.LASTMSG'"' INIT '"'CONFDATA.LASTMSG'"' TITLE '"Last message in range:"' BT '"_Ok|_Cancel"'
lastmsg = result
if(rc ~= 0 | lastmsg = "RESULT") then exit
REQUESTFILE TITLE '"Select directory for messages:"' ID '"'GLOBALCONFIG.SAVEDIR'"' FP PAT '"~"'
if(rc ~= 0 | result = "") then exit
else dir = result
REQUESTNOTIFY TEXT '"Select format for the filenames."' BT '"_Confname.MsgNr|_Subject|Subject._readme"'
if(rc ~= 0) then exit
select
when(result = 0) then format = 'readme'
when(result = 1) then format = 'confname'
when(result = 2) then format = 'subject'
end
/* if user selected a file instead (silly user) reduce it to dirname */
endchar = right(dir,1)
if(endchar ~= ":" & endchar ~= "/") then do
posi = lastpos("/",dir)
if(posi = 0) then posi = lastpos(":",dir)
dir = delstr(dir,posi+1)
end
/* change the illegal filename characters ":" and "/" into "." */
if(pos("/",CURRENT.CONFNAME) ~= 0 | pos(":",CURRENT.CONFNAME) ~= 0) then